<template>
    <div class="home">
    <header class="header">
        <div class="title">旅梦后台管理</div>
        <div class="user-info">欢迎 ADMIN</div>
    </header>
    <section class="body">
        <aside class="menu">
            <ul>
                <li class="menu-item" v-for="(item,index) in menu":key='item.id'>
                    <router-link :to="item.path">{{ item.name }}</router-link>
                </li>
            </ul>
            
        </aside>
        <main class="main">
            <router-view></router-view>
        </main>
    </section>
</div>
</template>

<script setup>
import { ref } from 'vue'
import { useRouter } from 'vue-router'
const menu = ref([
  {id: 1, name: '班级管理', path: '/class'},
  {id: 2, name: '讲师列表', path: '/teacher'},
  {id: 3, name: '就业统计', path: '/job'}
])
</script>

<style lang="css" scoped>
.home{
    height: 100vh;
}
.header {
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 22px;
    padding: 0 30px;
    background-color: rgb(205, 205, 255);
    color: whitesmoke;
}
.title{
    font-size: 30px;
}
.body{
    display: flex;
    height: calc(100vh - 70px);
}
.menu{
    width: 180px;
background-color: beige;
}
.menu-item{
    height: 50px;
    background-color: bisque;
}
.menu-item a{
    color: white;
    font-size: 20px;
    text-decoration: none;
    height: 100%;
    width: 100%;
    display: block;
    text-align: center;
    line-height: 50px;
}
.menu-item a:hover{
    background-color: lightblue;
}
</style>